/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sarco.bwi.lib;

import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.ServerSocket;

/**
 *
 * @author Andre
 */
public class OSInformation {
    public static String getJavaRuntimeName() {
        return get("java.runtime.name");
    }
    public static String getJavaVmLibraryPath() {
        return get("sun.boot.library.path");
    }
    public static String getJavaVmVersion() {
        return get("java.vm.version");
    }
    public static String getJavaVmVendor() {
        return get("java.vm.vendor");
    }
    public static String getJavaVendorUrl() {
        return get("java.vendor.url");
    }
    public static String getPathSeperator() {
        return get("path.seperator");
    }
    public static String getJavaVmName() {
        return get("java.vm.name");
    }
    public static String getFileEncodingPackage() {
        return get("file.encoding.pkg");
    }
    public static String getUserCountry() {
        return get("user.country");
    }
    public static String getJavaLauncher() {
        return get("sun.java.launcher");
    }
    public static String getOsPatchLevel() {
        return get("sun.os.patch.level");
    }
    public static String getJavaVmSpecificationsName() {
        return get("java.vm.specifications.name");
    }
    public static String getUserDir(){
        return get("user.dir");
    }
    public static String getJavaRuntimeVersion() {
        return get("java.runtime.version");
    }
    public static String getAwtGraphicsEnviroment() {
        return get("java.awt.graphicsenv");
    }
    public static String getJavaEndorsedDirectories() {
        return get("java.endorsed.dirs");
    }
    public static String getLineSeperator() {
        return get("line.seperator");
    }
    public static String getJavaVmSpecificationVendor() {
        return get("java.vm.specification.vendor");
    }
    public static String getUserVariant() {
        return get("user.variant");
    }
    public static String getOsName() {
        return get("os.name");
    }
    public static String getJnuEncoding() {
        return get("sun.jnu.encoding");
    }
    public static String getJavaLibraryPath() {
        return get("java.library.path");
    }
    public static String getJavaSpecificationName() {
        return get("java.specification.name");
    }
    public static String getJavaClassVersion() {
        return get("java.class.version");
    }
    public static String getManagementCompiler() {
        return get("sun.management.compiler");
    }
    public static String getOsVersion() {
        return get("os.version");
    }
    public static String getUserHome() {
        return get("user.home");
    }
    public static String getUserTimezone() {
        return get("user.timezone");
    }
    public static String getJavaAwtPrinterJob() {
        return get("java.awt.printerjob");
    }
    public static String getFileEncoding() {
        return get("file.encoding");
    }
    public static String getJavaSpecificationVersion() {
        return get("java.specification.version");
    }
    public static String getUserName() {
        return get("user.name");
    }
    public static String getJavaClassPath() {
        return get("java.class.path");
    }
    public static String getJavaVmSpecificationVersion() {
        return get("java.vm.specification.version");
    }
    public static String getSystemArchitecture() {
        return get("sun.arch.data.model");
    }
    public static String getJavaHome() {
        return get("java.home");
    }
    public static String getMainClass() {
        return get("sun.java.command");
    }
    public static String getJavaSpecificationVendor() {
        return get("java.specification.vendor");
    }
    public static String getUserLanguage() {
        return get("user.language");
    }
    public static String getAwtToolkit() {
        return get("awt.toolkit");
    }
    public static String getJavaVmInfo() {
        return get("java.vm.info");
    }
    public static String getJavaVersion() {
        return get("java.version");
    }
    public static String getJavaExternalDirectories() {
        return get("java.ext.dirs");
    }
    public static String getBootClassPath() {
        return get("sun.boot.class.path");
    }
    public static String getJavaVendor() {
        return get("java.vendor");
    }
    public static String getFileSeperator() {
        return get("file.seperator");
    }
    public static String getJavaVendorUrlBugreport() {
        return get("java.vendor.url.bug");
    }
    public static String getCpuEndian() {
        return get("sun.cpu.endian");
    }
    public static String getUnicodeEncoding() {
        return get("sun.io.unicode.encoding");
    }
    public static String getDesktopOs() {
        return get("sun.desktop");
    }
    public static String getCpuArchitecture() {
        return get("sun.cpu.isalist");
    }
    public static String get(String s) {
        return System.getProperty(s);
    }
    
    public static String getHostname() throws IOException {
        return InetAddress.getLocalHost().getCanonicalHostName();
    }
    public static String getIpAddress() throws IOException {
        return InetAddress.getLocalHost().getHostAddress();
    }
}
